/*
 * @Author: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @Date: 2024-06-17 17:16:44
 * @LastEditors: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @LastEditTime: 2024-06-19 15:36:15
 * @FilePath: \cq-admin-vue3\src\main.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)

import '@/mock/mock'
// 引入样式
import '@/styles/index.scss'
// 特别注意Message消息提示组件需要单独引入样式
// import 'element-plus/es/components/message/style/css'
import 'element-plus/theme-chalk/el-loading.css'
import 'element-plus/theme-chalk/el-message.css'
import 'element-plus/theme-chalk/el-notification.css'
import 'element-plus/theme-chalk/el-message-box.css'
import 'element-plus/theme-chalk/el-drawer.css'
// wangeditor-css
import '@wangeditor/editor/dist/css/style.css'
// pinia
import store from '@/stores/index'
app.use(store)

//引入路由鉴权文件
import './permisstion'

// 注册路由
import router from './router'
app.use(router)

// 注册图标全局组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

//svg插件需要配置代码
import 'virtual:svg-icons-register'

// 引入全局方法
import * as utils from '@/utils'
app.config.globalProperties.$utils = utils
app.mount('#app')
